Digital images are in very common use these days, driven in large part by the wide availability of digital cameras. When printing digital images it is common to rely on some sort of automatic processing to improve the visual appearance of the printed image. Such automatic correction systems can be fooled if the image has already been processed by the digital camera. Described herein are a method and apparatus that can automatically improve images that have been processed by a digital camera.
A common problem in image reproduction is the mismatch of the color space definition inside the digital file with the actual color space of the scene data. This can be caused by post-processing or a variety of other reasons. The most obvious mismatch is the mismatch in the gamma of the color space coordinates, where some devices intentionally use different gammas, e.g. gamma=1 for print and gamma=1.8 for display, and some devices use an effective different gamma based on scene content and lighting settings.
Disclosed in embodiments herein is a method for processing digital images comprising: (a) receiving a digital image to be printed; (b) selecting one of a predetermined set of target image gamma values; (c) transforming the digital image, using the selected set of target image gamma values, to produce a transformed image, wherein the gamma of the transformed image is that of the selected gamma value; (d) applying a first image evaluation test to the transformed image, including measuring at least a first image parameter of the transformed digital image, and comparing the measured first image parameter to that for an ideal image; (e) applying a second image evaluation test to the transformed image, including measuring at least a second image parameter of the transformed digital image, comparing the second image parameter to that for an ideal image, wherein the first and second image parameters are different; (f) calculating image quality using a pre-defined image quality function employing the values of the first image parameter and the second image parameter; (g) repeating steps (c) through (f) for each of the set of predetermined target gamma values; (h) selecting the target gamma value that has highest value of the image quality function; and (i) printing the image using the selected target gamma value.
Further disclosed in embodiments herein is a system for processing an image comprising: (a) a source of digital images; (b) an image memory connected to said source of digital images; (c) a gamma transformation module connected to the image memory, said gamma transformation module transforms the gamma of the stored digital image to a new gamma value chosen from a set of predefined test gamma values; (d) a first image evaluation module, connected to the gamma transformation module, wherein the first image evaluation module measures a first parameter of the gamma-transformed image and compares it to values characteristic of an ideal image; (e) a second image evaluation module, connected to the gamma transformation module, wherein the second image evaluation module measures a second parameter of the gamma-transformed image and compares it to values characteristic of an ideal image, and where the parameters measured are different from those measured by the first image evaluation module; (f) a image quality function computation module receiving the parameter values from the first image evaluation module and the second image evaluation module which computes an image quality value based on at least the first and second parameters and a predefined function of the parameters; (g) a control module connected to the image memory, the gamma transformation module, the first and second image evaluation modules, and the image quality function module, wherein the control module sets the test gamma value to be used, and keeps a record of the value of the image quality function for each test gamma value, said control module, upon determining that all of the predefined set of test gamma values have been evaluated, sends the gamma value with the best image quality value to a printer for printing the image using that gamma value.
The various embodiments described herein are not intended to limit the invention to those embodiments described. On the contrary, the intent is to cover all alternatives, modifications, and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims.